<ul class="list<?= empty($class) ? '' : " {$class}" ?>">
	<? foreach($data as $item): ?>
	<?php
		if(!empty($pattern['image'])) {
			$image = Set::extract($pattern['image'], $item);
		}else{
			$image = $item['image'];
		}
		
		if(!empty($pattern['title'])) {
			$title = Set::extract($pattern['title'], $item);
		}else{
			$title = $item['title'];
		}
		if(!empty($pattern['id'])) {
			$id = Set::extract($pattern['id'], $item);
		}else{
			$id = $item['id'];
		}
		
		$img_base = empty($image_base) ? '' : $image_base;
		if(!empty($image_base_pattern)) {
			$img_base .= Set::extract($image_base_pattern, $item) . "/";
		}
		
		preg_match_all('/\{.*?\}/', $href, $link_patterns);
		$link = $href;
		foreach($link_patterns[0] as $p) {
			$p = preg_replace('/\{|\}/', '', $p);
			$val = Set::extract($p, $item);
			$link = str_replace('{' . $p . '}', Inflector::slug($val, "-"), $link);
		}
	?>
	<li>
		<?= $this->Html->link(
			'<span class="image">'.
				$this->Html->image($img_base.'/'.$image).
			'</span>'.
			'<span class="title">' . $title . '</span>',
			
			$link,
			array('escape'=>false)) ?>
	</li>
	<? endforeach; ?>
</ul>
<br clear="all">
